<template>
  <el-tag
    :type="type"
    :style="style"
  >
    <!--{{$t('order.Packaging Services')}}-->
    {{packageMaterialName}}
  </el-tag>
</template>

<script>
export default {
  name: "PackageTag",
  props:{
    packageMaterialName:{
      type: String,
    },
    typeNum:{
      default : 1,
    }
  },
  data(){
    return {
      style: '',
      type: '',
    }
  },
  created() {
    this.changeType()
  },
  methods:{
    changeType(){
      switch (this.typeNum % 5){
        case 1:
          this.type = 'danger'
          break;
        case 2:
          this.type = 'info'
          this.style = 'background-color: #f9f0ff; color: #9254de;'
          break;
        case 3:
          this.type = 'success'
          break;
        case 4:
          this.type = ''
          break;
        case 0:
          this.type = 'info'
          this.style = 'background-color: #fff2e8; color: #fa541c;'
          break;
      }
    }
  }
}
</script>

<style scoped lang="scss">

</style>
